<template>
    <div class="contentDiv" style="width: 1000px">
        <Spin size="large" fix v-if="Loading"></Spin>
        <Form :label-width="180" :disabled="true">
            <Row style="margin-top: 15px">
                <i-col span="24" class="title">
                    <Form-item :label-width="10">
                        打印信息&打印记录
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <vxe-table border
                               auto-resize
                               row-id="id"
                               :row-key="true"
                               show-overflow="tooltip"
                               highlight-hover-row
                               align="center"
                               header-align="center"
                               ref="xTree"
                               :data="ss21004DtoList">
                        <vxe-table-column field="dbzd0002" title="变更时间" align="center" :formatter="renderTime"/>
                        <vxe-table-column field="dbzd0005" title="变更原因" align="center"/>
                        <vxe-table-colgroup title="变更后情况">
                            <vxe-table-column field="dbzd0001" title="户月领取金额" align="center"/>
                            <vxe-table-column field="dbzd0004" title="其中分类施保总额" align="center"/>
                        </vxe-table-colgroup>
                        <vxe-table-column field="dbzd0003" title="经办人" align="center"/>
                        <vxe-table-column field="dbzd0101" title="打印状态" align="center" :formatter="printStatus"/>
                        <vxe-table-column field="dbzd0102" title="打印时间" align="center" :formatter="renderTime"/>
                        <vxe-table-column field="dbzd0103" title="打印人" align="center"/>
                    </vxe-table>
                </i-col>
            </Row>
            <Row style="margin-top: 15px">
                <i-col span="24" class="title">
                    <Form-item :label-width="10">
                        打印操作
                    </Form-item>
                </i-col>
            </Row>
        </Form>
        <Row>
            <i-col span="24" class="title">
                <Button type="primary" @click="print" :disabled="!canPrint">打印</Button>
            </i-col>
        </Row>
    </div>
</template>

<script>
    import {postAction} from '@/api/request'
    import ICol from "view-design/src/components/grid/col";
    import {CommonMixin} from '@/views/common/js/CommonMixin'
    import {LodopMixin} from '../lodop'

    export default {
        mixins: [CommonMixin, LodopMixin],
        components: {ICol},
        props: ['ss21004DtoList', 'lodopUpdateInformation', 'dbzb0100','dbza0015'],
        data() {
            return {
                modal1: false,
                visible: false,
                disableSubmit: false,
                title: "",
                model: {},
                canPrint: false,
            }
        },
        methods: {
            print() {
                var param = new Object();
                param.lodopUpdateInformation = this.lodopUpdateInformation;
                param.dbzp0001 =  this.dbza0015;
                param.dbzp0002 = "PTN_3";
                this.commonPrint(param, 3, null, this.dbzb0100);
            }
        },
        mounted() {
            var ss21004DtoList = this.ss21004DtoList;
            for (var i in ss21004DtoList) {
                var dbzd0101 = ss21004DtoList[i].dbzd0101;
                if (dbzd0101 == "0") {
                    this.canPrint = true;
                    break;
                }
            }
        }
    }
</script>

<style scoped>
    /deep/ .title {
        height: 50px;
        text-align: center;
        line-height: 50px;
    }
</style>